function ImageSKu()
{
	this.show	= function(c, b, i, d)
	{
		$.getJSON
		(
			HOST_ADMIN + '/sku/show/?callback=?',
			{
				'c'	: c,
				'b'	: b,
				'i'	: i,
				'd'	: d
			},
			function(data){
				$('#divBrand_'+b).html(data.html);
			}
		);
	}
	
	this.saveDone	= function(i,c,b)
	{
		if(i){
			ImageSKu.show(c,b);
		}
		else{
			window.location.href=window.location.href;
		}
	}
	
	this.alertDuplicateSku	= function()
	{
		alert('Sku is duplicate. Please check again.');
	}
	
	this.showDimension	= function(i)
	{
		var hr	= $('#hr_'+i);
		var lr	= $('#lr_'+i);
		if( hr.hasClass('hide') ){
			hr.removeClass('hide');
		}else{
			hr.addClass('hide');
		}
		
		if( lr.hasClass('hide') ){
			lr.removeClass('hide');
		}else{
			lr.addClass('hide');
		}
		/*
		$('#hr_'+i).removeClass('hide');
		$('#lr_'+i).removeClass('hide');
		*/
	}
	
	this.renameAllFile	= function(i, di)
	{
		showWaiting();
		$.getJSON
		(
			HOST_ADMIN + '/sku/rename-all-file/?callback=?',
			{
				'i'		: i,
				'di'	: di
			},
			function(data)
			{
				window.location.href=window.location.href;
			}
		);
	}
	
	this.doWebReady	= function(i, di)
	{
		showWaiting();
		$.getJSON
		(
			HOST_ADMIN + '/sku/web-ready/?callback=?',
			{
				'i'		: i,
				'di'	: di
			},
			function(data)
			{
				window.location.href=window.location.href;
			}
		);
	}
}

var ImageSKu	= new ImageSKu();